﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="{$cfg_site_description}" />

<title>{$cfg_site_name} - 會員註冊/登入 </title>
{template 'header'}
<body>
<div id="sysmsg-error-box" style="top:157px;display: none;">
		<div class="sysmsgw hidd" id="sysmsg-error" style="display: block;">
			<div class="sysmsg"><span>{$ERROR_MSG}</span><span class="close">關閉</span></div>
		</div>
		<div class="sysmsgw hidd" id="sysmsg-success" style="display: none;">
			<div class="sysmsg"><span></span><span class="close">關閉</span></div>
		</div>
</div>
<div id="buy917_wrap">
	<div id="buy917_header">
                    <div id="buy917_logo">
                        <a href="index.php">Buy917</a>
                    </div>
                    <div class="buy917_header_banner">
                        <div class="buy917_header_topbanner">
                            {template 'login_line'} <!-- login_line.html 登入/註冊按鈕 -->
                            <?php include("admin/event.php")?>
                        </div>
                        <div class="buy917_header_select">
                            <div class="buy917_header_city">
                                {if !empty($_cityid)}
                                <div class="guides">
                                    <div class="city">
                                        <h2>{$_cityname}</h2>
                                    </div>
                                    <div id="guides-city-change" class="change">
                                        切換城市
                                    </div>
                                    <div id="guides-city-list" class="city-list">
                                        <ul>
                                            {loop $_citylist $v}
                                            <li {if $v['cid']==$_cityid}class="current"{/if}>
                                                <a href="index.php?cityid={$v['cid']}">{$v['cityname']}</a>
                                            </li>
                                            {/loop}
                                        </ul>
                                    </div>
                                </div>
                                {/if} 
                            </div>
                            <div class="buy917_header_group">
                                {template 'headergroup'} 
                            </div>
                        </div>
                    </div>
                </div>
  
     <!-- buy917_header -->{template 'menu_nav'} <!-- menu 導覽頁 -->
       
    <div id="buy917_middle">
        	<div class="buy917_grouplist_top"></div>      
            <div class="buy917_grouplist_body"> 
                <h2>已有{$cfg_site_name}帳戶？</h2>
        		 <div id="content">
        <div id="signup" style="position:relative; margin-bottom:15px; margin-left:10px; margin-top:10px;">
        <div id="deal-buy-login">
            <form action="login.php" method="post" id="deal-buy-form-login">
            <div id="deal-buy-login-form">
                <p><span>用戶名 </span>
                  <input type="text" class="f-input" id="deal-buy-email" name="user" size="30" value="" /></p>

                <p><span>密　碼</span>
                  <input type="password" class="f-input" name="password" size="30"/></p>
                <p class="act">
                    <input type="submit"  class="formbutton" name="commit" value="登錄"/>
                </p>
            </div>
            </form>
        </div>
    </div>

    <div class="box" id="deal-buy-box">
        <div class="box-top"></div>
        <div class="box-content">
            <div class="head"><h2>請註冊或登錄<span>快速註冊，只需30秒</span></h2></div>
            <div class="sect">
                <form action="reg.php" method="post" id="deal-buy-form-signup">                   
                    <div class="field username">
                        <label for="signup-username">用戶名</label>
                        <input type="text" class="f-input" size="30" name="username" id="signup-username" value=""/>
                        <span class="hint">4-16 個字符，一個漢字為兩個字符</span>

                    </div>
                    <div class="field password">
                        <label for="signup-password">密碼</label>
                        <input type="password" size="30" name="password" id="signup-password" class="f-input" />
                        <span class="hint">最少 4 個字符</span>
                    </div>
                    
                    <div class="field password">
                        <label for="signup-password-confirm">確認密碼</label>
                        <input type="password" size="30" name="password2" id="signup-password-confirm" class="f-input" />
                    </div>
                    
                     <div class="field">
                        <label for="signup-email-address">Email</label>

                        <input type="text" class="f-input" size="30" name="email" id="signup-email-address" value="" />
                        <span class="hint">登錄及找回密碼用，不會公開</span>
                    </div>
                    <div class="act">
                        <input type="submit" value="註冊" name="commit" id="signup-submit" class="formbutton"/>
                    </div>
                </form>
            </div>
        </div>
        <div class="box-bottom"></div>

    </div>
</div>
            </div><!-- buy917_grouplist_body -->
            <div class="buy917_grouplist_bottom"></div>
    </div><!-- buy917_middle -->
</div><!-- buy917wrap -->
<!-- footer -->

<script type="text/javascript">
jQuery(function($){
	$("#login-submit").click(function(){
		if($.trim($("#login-email-address").val()).length == 0)
		{
			$.showErr("請輸入了您的 用戶名");
			$("#login-email-address").focus();
			return false;
		}
		if($.trim($("#login-password").val()).length == 0)
		{
			$.showErr("請輸入了您的密碼");
			$("#login-email-address").focus();
			return false;
		}
	
	});
});
</script>



<script type="text/javascript"> 
jQuery(function($){
	
	$("#signup-submit").click(function(){
	
		if(!$.minLength($("#signup-username").val(),4,true))
		{
			$.showErr("用戶名太短，至少4個字符或2個漢字");
			$("#signup-username").focus();
			return false;
		}
		
		if(!$.maxLength($("#signup-username").val(),16,true))
		{
			$.showErr("用戶名太長，最多16個字符或8個漢字");
			$("#signup-username").focus();
			return false;
		}
		
		if(!$.minLength($("#signup-password").val(),4,false))
		{
			$.showErr("密碼太短，至少4個字符");
			$("#signup-password").focus();
			return false;
		}
		
		if($("#signup-password-confirm").val() != $("#signup-password").val())
		{
			$.showErr("密碼跟確認密碼不一致");
			$("#signup-password-confirm").focus();
			return false;
		}
		
		if($("#signup-password-confirm").val() != $("#signup-password").val())
		{
			$.showErr("密碼跟確認密碼不一致");
			$("#signup-password-confirm").focus();
			return false;
		}
		if($.trim($("#signup-email-address").val()).length == 0)
		{
			$.showErr("請輸入了您的 Email 地址");
			$("#signup-email-address").focus();
			return false;
		}
		if(!$.checkEmail($("#signup-email-address").val()))
		{
			$.showErr("您輸入了錯誤的 Email 地址");
			$("#signup-email-address").focus();
			return false;
		}	
		
		
		
		
	});
});
</script>
<div id="buy917_footer">
	{template 'footer'}	
</div>
</body>
</html>
